<?php if(!defined("PATH_HD"))exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CMS系统</title>
<style>
body{background: url(http://localhost/cms/index/tpl/public/img/bg2.png)}

#tit {
	background: url(http://localhost/cms/index/tpl/public/img/long.png)
}

#daohang {
	background: url(http://localhost/cms/index/tpl/public/img/qi/2012-08-26_172458_r2_c2_s1.png)
}

#wenzhang-w {
	background: url(http://localhost/cms/index/tpl/public/img/qi/greenc.gif)
}

#xiaowz-t {
	width: 330px;
	height: 29px;
	background: url(http://localhost/cms/index/tpl/public/img/qi/bluec.gif );
}

#xiaowz-l {
	background: url(http://localhost/cms/index/tpl/public/img/qi/bluec.gif )
}
</style>
<script type='text/javascript' src='http://localhost/cms/HD/org/jquery-1.7.2.min.js'></script>
<link type="text/css" rel="stylesheet" href="http://localhost/cms/index/tpl/public/css/index.css"/> 
<script type="text/javascript" src="<?php echo "http://localhost/cms/index/tpl/public/js/index.js";?>"></script>
<script>
$(function(){
	$("img[name='code']").click(function(){
	    $("img[name='code']").attr("src","http://localhost/cms/index.php/code/code"+"?"+Math.random());

		})
	
})

</script>


</head>
<body>
<div id="all">
<?php if(!defined("PATH_HD"))exit;?>
<div id='tit'>
</div>
<div id='daohang'>
<ul>
<li><a href="http://localhost/cms/index.php/index">首页</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>
<ul>
<li><a href='http://localhost/cms/index.php/lanmu/index/catid/1'>爱情文章</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>
<ul>
<li><a href='http://localhost/cms/index.php/lanmu/index/catid/2'>友情文章</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>
<ul>
<li><a href='http://localhost/cms/index.php/lanmu/index/catid/3'>亲情文章</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>
<ul>
<li><a href='http://localhost/cms/index.php/lanmu/index/catid/4'>搞笑文章</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>

<ul>
<li><a href='http://localhost/cms/index.php/lanmu/index/catid/5'>人生哲理</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>
<ul>
<li><a href='http://localhost/cms/index.php/lanmu/index/catid/6'>励志文章</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>
<ul>
<li><a href='http://localhost/cms/index.php/lanmu/index/catid/7'>心情日记</li></a><li><img src="http://localhost/cms/index/tpl/public/img/qi/2012-08-26_173627_r2_c2.png"></li>
</ul>
<ul>
<li><a href='http://localhost/cms/index.php/met'>会员中心</li></a>
</ul>
</div><br/>
<!--左边-->
<div>
<form action="http://localhost/cms/index.php/search/index">
<input type='text' name='title' >
<input type='submit' value='点击搜索文章'>
</form>
</div>
<div id='l'><!--登陆-->
	<div id='loign'>
	
	<div id='huiyuan'>会员中心</div>
	
	<?php  if(@empty($_SESSION['user']['uid'])){?>
	
	<form action='http://localhost/cms/index.php/index/login' method='post'>
	用户名:<input type='text' name='username'><br />
	密 &nbsp; 码:&nbsp;<input type='password' name='password'><br />
	验 &nbsp;证 :&nbsp;<input type='text' name='code'class='code'><img  name='code' src='http://localhost/cms/index.php/code/code' /><br />
	<input type='submit' value=登陆><br /> <span class='zhuce'><a href="http://localhost/cms/index.php/reg/index">没有账户现在注册</a> </span></form>
	<?php }else{ ?> <br />
	
	 <?php
if($_SESSION["user"]['username']=='admin'){?>
	
	<ul>
	<li><img width='30px' height='22px' src='http://localhost/cms/index/tpl/public/img/lo.png' /></li>
	<li>您好:<b><?php echo $_SESSION['user']['username'];?></b>欢迎回来</li>
	<li><a href="http://localhost/cms/admin.php/index">后台管理</a></li>
	<li><a href="#">个人空间</a></li>
	<li><a href="#">发表文章</a></li>
	<li><a href="#">我的文章</a></li>
	<li><a href="#">我的留言</a></li>
	<li><a href="http://localhost/cms/index.php/index/out">退出登陆</a></li>
	</ul>

	<?php }else{ ?>
	<ul>
	<li><img width='30px' height='30px' src='http://localhost/cms/index/tpl/public/img/lo.png' /></li>
	
	<li>
	您好:<b><?php echo $_SESSION['user']['username'];?></b> 
	</li><br />
	<li><a href="#">个人空间</a></li><br />
	<li><a href="#">发表文章</a></li>
	<li><a href="#">我的文章</a></li>
	<li><a href="#">我的留言</a></li>
	<li><a href="http://localhost/cms/index.php/index/out">退出登陆</a></li>
	</ul>
	
	<?php };?>
	 
	<?php }?>
</div>


<!--精品美文 #############################################-->

<div id='jingpin'>
	<div id='xiaowz-l'>
		<img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' /> 
		<img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
	    <div id='title'>精品美文</div>
	</div>
<div id='jingpin-n'>
   <?php $db=M("news");$row=$db->where("catid=8")->limit(5)->findall();foreach($row as $field):?>
		<table width='320' height='28'>
			<tr>
				<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?>
				</a></td>
	
			</tr>
		</table>
	<?php endforeach; ?>

 </div>
</div>
<!--原创文章 -->
<div id='jingpin'>
	 <div id='xiaowz-l'>
		 <img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' />
		 <img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
         <div id='title'>原创文章</div>
	</div>
	<div id='jingpin-n'>
	  <?php $db=M("news");$row=$db->where("catid=9")->limit(5)->findall();foreach($row as $field):?>
			<table width='320' height='28'>
				 <tr>
					<td>
					<a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?></a>
					</td>
		
				</tr>
			</table>
		<?php endforeach; ?>
	
	  </div>
</div>

<!--心情日记 -->
<div id='jingpin'>
<div id='xiaowz-l'><img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' /> <img
	id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
<div id='title'>心情日记</div>
</div>
<div id='jingpin-n'>
<ul>
	<?php $db=M("news");$row=$db->where("catid=7")->limit(5)->findall();foreach($row as $field):?>
	<table width='220' height='28'>
		<tr>
			<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?>
			</a></td>

		</tr>
	</table>
	<?php endforeach; ?>
</ul>
</div>
</div>

<!--原创诗歌 -->
<div id='jingpin'>
<div id='xiaowz-l'><img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' /> <img
	id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
<div id='title'>原创诗歌</div>
</div>
<div id='jingpin-n'>
<ul>
	<?php $db=M("news");$row=$db->where("catid=10")->limit(5)->findall();foreach($row as $field):?>
	<table width='320' height='28'>
		<tr>
			<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?>
			</a></td>

		</tr>
	</table>
	<?php endforeach; ?>
</ul>
</div>
</div>


</div>



<!--右边#############################################################-->
<div id='r'><!--编辑导读1-->

<div>
<div id='wenzhang-w'><img src='http://localhost/cms/index/tpl/public/img/qi/greenl.gif' /> <img
	id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/greenr.gif' />
<div id='title'>热门推荐</div>
</div>
<div id='bianji'>
<div id="marquee_demo"
	style="overflow: hidden; width: 100%; text-align: center; border: 1px solid #0066cc">
<table cellspacing="0" cellpadding="3" align="center" border="0">
	<tr>
		<td id="marquee_product1" valign="top">
		<table width="100%" height="178" border="0" cellpadding="2"
			cellspacing="0">
			<tr>
				<td><a href="#"><img src="http://localhost/cms/index/tpl/public/img/indeximg/1.png"
					border=0></a></td>
				<td><a href="#"><img src="http://localhost/cms/index/tpl/public/img/indeximg/2.png"
					border=0></a></td>
				<td><a href="#"><img src="http://localhost/cms/index/tpl/public/img/indeximg/3.png"
					border=0></a></td>
			</tr>
		</table>
		</td>
		<td id="marquee_product2" valign="top"></td>
	</tr>
</table>
</div>
</div>
<!--精彩文章2-->
<div>
<div id='wenzhang-w'><img src='http://localhost/cms/index/tpl/public/img/qi/greenl.gif' /> <img
	id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/greenr.gif' />
<div id='title'>精彩文章</div>
</div>
<div id='bianji'>

	<?php $db=M("news");$row=$db->where("catid=12")->limit(5)->findall();foreach($row as $field):?>
	<a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>">
		 <span class="jingcai">
			<img src=http://localhost/cms/<?php echo $field['thumb'];?>><br />
			<?php echo substr($field['title'],0,33);?>
			</span>
		   
	</a>
	
	<?php endforeach; ?>

</div>
</div>

<!--小块 ############################################--> <!--爱情文章 -->

<div id='xiaowz'>
	<div id='xiaowz-t'>
		<img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' />
		<img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
		<div id='title'>爱情文章</div>
	</div>
 <div id='xiaowzn'><?php $db=M("news");$row=$db->where("catid=1")->limit(5)->findall();foreach($row as $field):?>
	<table width='320' height='28'>
		<tr>
			<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?>
			</a></td>
			<td align='right'><?php echo date("Y-m-d",$field['addtime']);?></td>
		</tr>
	</table>
	<?php endforeach; ?>
</div>

</div>
<!--亲情文章 -->

<div id='xiaowz'>
	<div id='xiaowz-t'><img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' />
	 <img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
	<div id='title'>亲情文章</div>
	</div>
	<div id='xiaowzn'>
		<?php $db=M("news");$row=$db->where("catid=3")->limit(5)->findall();foreach($row as $field):?>
			<table width='320' height='28'>
				<tr>
					<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?>
					</a></td>
					<td align='right'><?php echo date("Y-m-d",$field['addtime']);?></td>
				</tr>
			</table>
		<?php endforeach; ?>
	</div>

</div>

<!--友情文章 -->

<div id='xiaowz'>
	<div id='xiaowz-t'>
	<img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' />
	 <img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
	<div id='title'>友情文章</div>
	</div>
	<div id='xiaowzn'>
		<?php $db=M("news");$row=$db->where("catid=2")->limit(5)->findall();foreach($row as $field):?>
			<table width='320' height='28'>
				<tr>
					<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?> </a></td>
					<td align='right'><?php echo date("Y-m-d",$field['addtime']);?></td>
				</tr>
			</table>
		<?php endforeach; ?>
	</div>
	
</div>

<!--搞笑文章 -->

<div id='xiaowz'>
	<div id='xiaowz-t'><img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' /> 
	<img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
	<div id='title'>搞笑文章</div>
	</div>
    <div id='xiaowzn'>
		<?php $db=M("news");$row=$db->where("catid=4")->limit(5)->findall();foreach($row as $field):?>
			<table width='320' height='28'>
				<tr>
					<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,40);?> </a></td>
					<td align='right'><?php echo date("Y-m-d",$field['addtime']);?></td>
				</tr>
			</table>
		<?php endforeach; ?>
	</div>
	
	</div>


<!--励志文章 -->

<div id='xiaowz'>
	<div id='xiaowz-t'><img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' />
		 <img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
		 <div id='title'>励志文章</div>
	</div>
	<div id='xiaowzn'>
		<?php $db=M("news");$row=$db->where("catid=6")->limit(5)->findall();foreach($row as $field):?>
			<table width='320' height='28'>
				<tr>
					<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?> </a></td>
					<td align='right'><?php echo date("Y-m-d",$field['addtime']);?></td>
				</tr>
			</table>
		<?php endforeach; ?>
	</div>

</div>



<!--人生哲理-->
<div id='xiaowz'>
	<div id='xiaowz-t'><img src='http://localhost/cms/index/tpl/public/img/qi/bluel.gif' />
	 <img id='imgl' src='http://localhost/cms/index/tpl/public/img/qi/bluer.gif' />
	<div id='title'>亲情文章</div>
	</div>
	<div id='xiaowzn'>
	   <?php $db=M("news");$row=$db->where("catid=5")->limit(5)->findall();foreach($row as $field):?>
		 <table width='320' height='28'>
			<tr>
				<td><a href="http://localhost/cms/index.php/body/index/id/<?php echo $field['id'];?>"><?php echo substr($field['title'],0,33);?> </a></td>
				<td align='right'><?php echo date("Y-m-d",$field['addtime']);?></td>
			</tr>
		</table>
	   <?php endforeach; ?>
  </div>

</div>

<!-- 友情链接##################### -->
</div>
</div>

<?php if(!defined("PATH_HD"))exit;?>
<div id='youqing'>
<div id='youqing-t'>友情链接</div>
<ul>
	<a href="http://www.baidu.com">
	<li>百度</li>
	</a>
	<a href="http://www.baidu.com">
	<li>新浪</li>
	</a>
	<a href="http://www.baidu.com">
	<li>雅虎</li>
	</a>
	<a href="http://www.baidu.com">
	<li>搜狐</li>
	</a>
	<a href="http://www.baidu.com">
	<li>腾讯</li>
	</a>
	<a href="http://www.baidu.com">
	<li>百度</li>
	</a>
	<a href="http://www.baidu.com">
	<li>新浪</li>
	</a>
	<a href="http://www.baidu.com">
	<li>雅虎</li>
	</a>
	<a href="http://www.baidu.com">
	<li>搜狐</li>
	</a>
	<a href="http://www.baidu.com">
	<li>腾讯</li>
	</a>
</ul>
</div>

</body>
</html>